package com.yunke.vo.chat;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * 消息VO
 * 
 * @author yunke
 * @since 1.0.0
 */
@Data
@Schema(description = "消息信息")
public class YunkeMessageVo {

    /**
     * 消息ID
     */
    @Schema(description = "消息ID")
    private String messageId;

    /**
     * 聊天室ID
     */
    @Schema(description = "聊天室ID")
    private String chatId;

    /**
     * 发送者信息
     */
    @Schema(description = "发送者信息")
    private UserInfo sender;

    /**
     * 接收者信息
     */
    @Schema(description = "接收者信息")
    private UserInfo receiver;

    /**
     * 消息类型
     */
    @Schema(description = "消息类型")
    private Integer messageType;

    /**
     * 消息类型文本
     */
    @Schema(description = "消息类型文本")
    private String messageTypeText;

    /**
     * 消息内容
     */
    @Schema(description = "消息内容")
    private String content;

    /**
     * 媒体文件URL
     */
    @Schema(description = "媒体文件URL")
    private String mediaUrl;

    /**
     * 媒体文件大小文本
     */
    @Schema(description = "媒体文件大小文本")
    private String mediaSizeText;

    /**
     * 语音时长（秒）
     */
    @Schema(description = "语音时长（秒）")
    private Integer voiceDuration;

    /**
     * 语音时长文本
     */
    @Schema(description = "语音时长文本")
    private String voiceDurationText;

    /**
     * 位置信息
     */
    @Schema(description = "位置信息")
    private LocationInfo location;

    /**
     * 消息状态
     */
    @Schema(description = "消息状态")
    private Integer status;

    /**
     * 消息状态文本
     */
    @Schema(description = "消息状态文本")
    private String statusText;

    /**
     * 是否已读
     */
    @Schema(description = "是否已读")
    private Boolean isRead;

    /**
     * 已读时间
     */
    @Schema(description = "已读时间")
    private Long readTime;

    /**
     * 已读时间文本
     */
    @Schema(description = "已读时间文本")
    private String readTimeText;

    /**
     * 是否撤回
     */
    @Schema(description = "是否撤回")
    private Boolean isRecall;

    /**
     * 撤回时间
     */
    @Schema(description = "撤回时间")
    private Long recallTime;

    /**
     * 撤回时间文本
     */
    @Schema(description = "撤回时间文本")
    private String recallTimeText;

    /**
     * 回复的消息信息
     */
    @Schema(description = "回复的消息信息")
    private ReplyInfo replyInfo;

    /**
     * 发送时间
     */
    @Schema(description = "发送时间")
    private Long sendTime;

    /**
     * 发送时间文本
     */
    @Schema(description = "发送时间文本")
    private String sendTimeText;

    /**
     * 是否是我发送的
     */
    @Schema(description = "是否是我发送的")
    private Boolean isMine;

    /**
     * 是否显示时间（连续消息可能不显示时间）
     */
    @Schema(description = "是否显示时间")
    private Boolean showTime;

    /**
     * 用户信息
     */
    @Data
    @Schema(description = "用户信息")
    public static class UserInfo {
        @Schema(description = "用户ID")
        private Long userId;

        @Schema(description = "昵称")
        private String nickname;

        @Schema(description = "头像")
        private String avatar;
    }

    /**
     * 位置信息
     */
    @Data
    @Schema(description = "位置信息")
    public static class LocationInfo {
        @Schema(description = "经度")
        private Double longitude;

        @Schema(description = "纬度")
        private Double latitude;

        @Schema(description = "地址")
        private String address;
    }

    /**
     * 回复信息
     */
    @Data
    @Schema(description = "回复信息")
    public static class ReplyInfo {
        @Schema(description = "回复的消息ID")
        private String replyMessageId;

        @Schema(description = "回复的消息内容")
        private String replyContent;

        @Schema(description = "回复的发送者昵称")
        private String replySenderName;
    }
} 